package com.qf.leadnewsschedule.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.qf.qfleadnewsmodel.commons.dtos.ResponseResult;
import com.qf.qfleadnewsmodel.schedule.dtos.Task;
import com.qf.qfleadnewsmodel.schedule.pojos.Taskinfo;

public interface TaskinfoService extends IService<Taskinfo> {

    void add(Task task);

    /**
     * 将任务数据添加到数据库
     * @param task
     * @return
     */
    Taskinfo save2DB(Task task);

    /**
     * 更具任务类型和优先级消费任务
     * @param taskType
     * @param priority
     * @return
     */
    Task consume(Integer taskType, Integer priority);
}
